# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=lightsoff
pkgver=3.30.0
pkgrel=1
pkgdesc="Turn off all the lights"
url="https://wiki.gnome.org/Apps/Lightsoff"
arch=(x86_64)
license=(GPL)
depends=(clutter-gtk librsvg)
makedepends=(gobject-introspection yelp-tools appstream-glib vala git meson)
groups=(gnome-extra)
_commit=c5cf5324176f1d3eea1d1150ab752e7243b7b2db  # tags/3.30.0^0
source=("git+https://gitlab.gnome.org/GNOME/lightsoff.git#commit=$_commit"
        icon.diff)
sha256sums=('SKIP'
            '93534780ccf018d55b529ea2f43736be3a5e29b90d5f6cf1710b219948068cca')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  patch -Np1 -i ../icon.diff
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
